﻿<Window x:Class="Gaming_club.Windows.MainMenuWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Gaming_club.Windows"
        mc:Ignorable="d"
        Title="Главное меню" Height="1080" Width="1920"
        WindowState="Maximized" Loaded="Window_Loaded" Closed="Window_Closed" Closing="Window_Closing">
    <Window.Resources>
        <Style x:Key="NoHoverButton" TargetType="Button">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Foreground" Value="Black"/>
            <Setter Property="FontFamily" Value="Segoe UI Black"/>
            <Setter Property="FontSize" Value="16"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}">
                            <ContentPresenter HorizontalAlignment="Center"
                                              VerticalAlignment="Center"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Background" Value="#34c6cd"/>
                </Trigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <Grid>
        <Grid HorizontalAlignment="Left" Height="1064" 
              VerticalAlignment="Center" Width="98" 
              Background="#FFFF7673">

        </Grid>

        <Button Content="ЛИЧНЫЙ КАБИНЕТ" 
                HorizontalAlignment="Left" Margin="-63,175,0,0" 
                VerticalAlignment="Top" Width="225" FontFamily="Segoe UI Black" 
                BorderBrush="#00707070" Background="#00DDDDDD" 
                RenderTransformOrigin="0.5,0.5" FontSize="20"
                Style="{StaticResource NoHoverButton}"
                Cursor="Hand" Click="Button_Click_1">
            <Button.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform Angle="270"/>
                    <TranslateTransform/>
                </TransformGroup>
            </Button.RenderTransform>
        </Button>

        <Button Content="ИГРОТЕКИ" 
                HorizontalAlignment="Left" Margin="-48,493,0,0" 
                VerticalAlignment="Top" Width="204" FontFamily="Segoe UI Black"
                BorderBrush="#00707070" Background="#00DDDDDD"
                RenderTransformOrigin="0.5,0.5" FontSize="20"
                Style="{StaticResource NoHoverButton}"
                Cursor="Hand" Click="Button_Click_2">
            <Button.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform Angle="270"/>
                    <TranslateTransform/>
                </TransformGroup>
            </Button.RenderTransform>
        </Button>

        <Button Content="ТУРНИРЫ" 
                HorizontalAlignment="Left" Margin="-42,818,0,0" 
                VerticalAlignment="Top" Width="203" FontFamily="Segoe UI Black" 
                BorderBrush="#00707070" Background="#00DDDDDD"
                RenderTransformOrigin="0.5,0.5" FontSize="20" 
                Style="{StaticResource NoHoverButton}"
                Cursor="Hand">
            <Button.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform Angle="270"/>
                    <TranslateTransform/>
                </TransformGroup>
            </Button.RenderTransform>
        </Button>
        <Image Source="/image/Логотип.png" HorizontalAlignment="Left" 
               VerticalAlignment="Top" Height="70" Width="396" Margin="814,0,0,0"/>

        <Grid Name="gridCabinet" HorizontalAlignment="Left" Height="979" Margin="91,75,0,0" 
              VerticalAlignment="Top" Width="1827"
              Visibility="Hidden">
            <Label Content="ЛИЧНЫЙ КАБИНЕТ" HorizontalAlignment="Left"
                   VerticalAlignment="Top" FontFamily="Segoe UI Black" FontSize="25" Margin="191,10,0,0"
                />
            <Image x:Name="profileImage" Height="224" Width="270"
                   Margin="30,53,1529,0" VerticalAlignment="Top"
                   />
            <Button x:Name="editImageBtn" Content="Выбрать изображение" HorizontalAlignment="Left" Height="30" Margin="30,281,0,0" 
                    VerticalAlignment="Top" Width="270" Click="editImageBtn_Click"/>
            <Label Content="Ваше имя:" HorizontalAlignment="Left" Height="30" 
                   Margin="318,53,0,0" VerticalAlignment="Top" Width="90"/>
            <TextBox x:Name="txtName" HorizontalAlignment="Left" Height="30" Margin="418,53,0,0"
                     TextWrapping="Wrap" Text="" VerticalAlignment="Top" 
                     Width="240" VerticalContentAlignment="Center" />

            <Label Content="Ваша фамилия:" HorizontalAlignment="Left" Height="30" 
                   Margin="318,88,0,0" VerticalAlignment="Top" Width="95"/>

            <TextBox x:Name="txtSurname" HorizontalAlignment="Left" Height="30" 
                     Margin="418,88,0,0" TextWrapping="Wrap" 
                     Text="" VerticalAlignment="Top" 
                     Width="240" VerticalContentAlignment="Center" />
            <Label Content="Ваше отчество:" HorizontalAlignment="Left" Height="30" 
                Margin="318,123,0,0" VerticalAlignment="Top" Width="95"/>
            <TextBox x:Name="txtPatrynumic" HorizontalAlignment="Left" Height="30" 
                Margin="418,123,0,0" TextWrapping="Wrap" 
                Text="" VerticalAlignment="Top" 
                Width="240" VerticalContentAlignment="Center" />
            <Label Content="Ваш логин:" HorizontalAlignment="Left" Height="30" 
                Margin="318,158,0,0" VerticalAlignment="Top" Width="95"/>
            <TextBox x:Name="txtLogin" HorizontalAlignment="Left" Height="30" 
                Margin="418,158,0,0" TextWrapping="Wrap" 
                Text="" VerticalAlignment="Top" 
                Width="240" VerticalContentAlignment="Center" />
            <Label Content="Ваш пароль:" HorizontalAlignment="Left" Height="30" 
                Margin="318,193,0,0" VerticalAlignment="Top" Width="95"/>
            <TextBox x:Name="txtPassword" HorizontalAlignment="Left" Height="30" 
                Margin="418,193,0,0" TextWrapping="Wrap" 
                Text="" VerticalAlignment="Top" 
                Width="240" VerticalContentAlignment="Center" />
            <Label Content="Телефон:" HorizontalAlignment="Left" Height="30" 
                Margin="318,228,0,0" VerticalAlignment="Top" Width="95"/>
            <TextBox x:Name="txtPhoneNumber" Margin="418,228,1169,0" 
                 TextWrapping="Wrap" Text="" VerticalAlignment="Top"
                 PreviewTextInput="TextBox_PreviewTextInput" Height="30"
                 TextChanged="TextBox_TextChanged"
                 VerticalContentAlignment="Center" FontSize="16"/>
            <Button x:Name="btnSaveChanges" Content="Сохранить измениния" HorizontalAlignment="Left" 
                    Height="30" Margin="318,281,0,0" VerticalAlignment="Top" 
                    Width="340" Click="btnSaveChanges_Click"/>
        </Grid>


        <Grid Name="gridGameLibrary" HorizontalAlignment="Left" Height="979" Margin="91,75,0,0" 
              VerticalAlignment="Top" Width="1827"
              Visibility="Visible">
            <Grid.RowDefinitions>
                <RowDefinition Height="428*"/>
                <RowDefinition Height="551*"/>
            </Grid.RowDefinitions>
            <Label Content="Расписание игротек" HorizontalAlignment ="Center" FontSize="60" Grid.RowSpan="2"/>
            <ListBox HorizontalAlignment="Left" 
                     Height="804" 
                     Margin="59,98,0,0" 
                     VerticalAlignment="Top" 
                     Width="1698"
                     FontSize="20" Grid.RowSpan="2"
                     Name="lbGameLibrary" SelectionChanged="lbGameLibrary_SelectionChanged">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel>
                            <TextBlock>
                                <Run Text="id: " FontWeight="Bold"/>
                                <Run Text="{Binding id}" FontWeight="Light"/>
                                <Run Text=" Название: " FontWeight="Bold"/>
                                <Run Text="{Binding title}" FontWeight="Light"/>
                                <Run Text=" Дата начала: " FontWeight="Bold"/>
                                <Run Text="{Binding start_date}" FontWeight="Light"/>
                                <Run Text="Минимальный возраст: " FontWeight="Bold"/> 
                                <Run Text="{Binding min_age}"/>
                            </TextBlock>

                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>


    </Grid>
</Window>
